package c.h.a.j0;

import android.location.GnssStatus;
import android.location.GnssStatus.Callback;
import c.f.a.a.a.a;
import c.h.a.d0.e;
import c.h.a.j0.q0.c;
import c.h.a.m0.h;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/* compiled from: TabGPS */
public class s0 extends Callback {
    public final /* synthetic */ q0 a;

    public s0(q0 q0Var) {
        this.a = q0Var;
    }

    public void onFirstFix(int i) {
        q0.t0(this.a, i);
    }

    public void onSatelliteStatusChanged(GnssStatus gnssStatus) {
        if (!this.a.m0()) {
            q0 q0Var = this.a;
            q0Var.b0 = gnssStatus;
            Objects.requireNonNull(q0Var);
            int satelliteCount = gnssStatus.getSatelliteCount();
            for (List list : q0Var.h0.values()) {
                if (list != null) {
                    list.clear();
                }
            }
            for (int i = 0; i < satelliteCount; i++) {
                e eVar = new e();
                gnssStatus.getAzimuthDegrees(i);
                gnssStatus.getCn0DbHz(i);
                gnssStatus.getElevationDegrees(i);
                eVar.a = a.j(gnssStatus.getConstellationType(i));
                if (h.c) {
                    gnssStatus.getCarrierFrequencyHz(i);
                }
                gnssStatus.getSvid(i);
                List list2 = (List) q0Var.h0.get(Integer.valueOf(eVar.a));
                if (list2 == null) {
                    list2 = new ArrayList();
                    q0Var.h0.put(Integer.valueOf(eVar.a), list2);
                }
                list2.add(eVar);
            }
            q0.s0(this.a);
            q0 q0Var2 = this.a;
            c cVar = q0Var2.j0;
            if (cVar != null) {
                cVar.h.setText(q0Var2.m0);
            }
        }
    }

    public void onStarted() {
    }

    public void onStopped() {
    }
}
